package com.GroupSix.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
import java.util.Date;
@Data
@TableName("exam_answer")
public class ExamAnswerEntity implements Serializable{
        private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)//主键
    @JsonSerialize(using = ToStringSerializer.class)
    private Long Id;

    private Integer studentId;

    private Integer examId;

    private Integer courseId;

    private Integer classId;
    //考试开始时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;
    //考试提交试卷
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime submitTime;
    //考试得分
    private Double score;
    //是否自动提交,用0表达否,1表示是
    private Integer autoSubmitted;
    //是否统计过 0表示没有,1表示统计过
    private Integer isUsed;
    //答案内容

    private String[] studentAnswers;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
}
